/**
 * 
 */
package fr.ema.arch3d.analyser.consistencyChecker.consistencyCheckerItf;

import fr.ema.arch3d.jmodel.assembly.Assembly;
import fr.ema.arch3d.jmodel.specification.Specification;
import fr.ema.arch3d.xoadl.assembly.AssemblyConstraintADL;
import fr.ema.arch3d.xoadl.assembly.ComponentInstanceADL;
import fr.ema.arch3d.xoadl.assembly.ConnectorInstanceADL;
import fr.ema.arch3d.xoadl.specification.ComponentRoleADL;
import fr.ema.arch3d.xoadl.specification.ConnectionADL;

/**
 * class description
 * 
 * @version    version 11 janv. 2010
 * @author     Huaxi (Yulin) ZHANG
 */
public interface NameConsistencyChecker {

    /**
     * Check the new added component role whether has a same name with one of the
     * component role in the existing specification.
     *
     * @param spec  the existing specification that this component role wants to add.
     * @param cmpRole  the new component role should be checked.
     */
    public void check(Specification spec, ComponentRoleADL cmpRole);

    
    /**
     * Check the new added connection whether has a same name with one of the
     * connection in the existing specification.
     *
     * @param spec  the existing specification that this connection wants to add.
     * @param connection  the new connection should be checked.
     */
    public void check(Specification spec, ConnectionADL connection);
    
    /**
     * Check the new added component instance whether has a same name with one of the
     * component instance in the existing assembly.
     *
     * @param ass  the existing assembly that this component instance wants to add.
     * @param cmpIns  the new component instance should be checked.
     */
    public void check(Assembly ass, ComponentInstanceADL cmpIns);
    
    /**
     * Check the new added connector instance whether has a same name with one of the
     * connector instance in the existing assembly.
     *
     * @param ass  the existing assembly that this connector instance wants to add.
     * @param ctrIns  the new connector instance should be checked.
     */
    public void check(Assembly ass, ConnectorInstanceADL ctrIns);
    
    /**
     * Check the new added assembly constraint whether has a same name with one of the
     * assembly constraint in the existing assembly.
     *
     * @param ass  the existing assembly that this assembly constraint wants to add.
     * @param assConstraint  the new assembly constraint should be checked.
     */
    public void check(Assembly ass, AssemblyConstraintADL assConstraint);
}
